package design.patterns.creational.abstractfactroy;

/**
 * @author gjx
 * @version v1.0
 * @Description 抽象工厂模式
 * @date 2019/3/29 17:30
 */
public class Test {
    public static void main(String[] args) {
        ProductFactory  productFactory = new LenovoProductFactory();
        Computer computer = productFactory.makeComputer();
        Phone phone = productFactory.makePhone();
        System.out.println(computer);
        System.out.println(phone);

        productFactory = new AppleProductFacotry();
        computer = productFactory.makeComputer();
        phone = productFactory.makePhone();
        System.out.println(computer);
        System.out.println(phone);
    }
}
